package com.yanyu.space.member.listener.rocket;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.Message;
import org.springframework.messaging.support.ErrorMessage;

import java.util.Map;

/**
 * @author gz
 */
@Slf4j
public class ConsumerTest {

    @StreamListener("errorChannel")
    public void error(Message<?> message) {
        ErrorMessage errorMessage = (ErrorMessage) message;
        log.info("-------------------Handling ERROR: " + errorMessage);
    }
}
